from People import People


class Student(People):
    score = 0

    def __init__(self, score, name, age):
        self.score = score
        # 方式1：使用父类名调用父类的构造函数
        # People.__init__(self, name, age)
        # 方式2 [推荐]：使用super调用父类的构造函数
        super().__init__(name, age)

    def print_file(self):
        print('name: ' + self.name, 'age: ' + str(self.age) + ' score: ' + str(self.score))


student = Student(80, '张三', 18)
student.print_file()
print(student.get_name())
